#include <iostream>
using namespace std;

char mp[101][101];
int n, m, k;

// 统计横向或纵向的合法数量
int count(bool isRow) {
	int res = 0;
	int max_i = isRow ? n : m;  // 行或列的总数
	int max_j = isRow ? m : n;  // 每行/列的长度

	for (int i = 1; i <= max_i; i++) {
		int consecutive = 0;
		for (int j = 1; j <= max_j; j++) {
			// 根据方向获取当前点坐标
			int x = isRow ? i : j;
			int y = isRow ? j : i;

			if (mp[x][y] == '.') {
				consecutive++;
				if (consecutive >= k) {
					res++;
				}
			} else {
				consecutive = 0;
			}
		}
	}
	return res;
}

int main() {
	cin >> n >> m >> k;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= m; j++)
			cin >> mp[i][j];

	int row = count(true);   // 横向统计
	int col = count(false);  // 纵向统计

	// 当k=1时，每个点会被横向和纵向各统计一次，需要去重
	if (k == 1) {
		// 计算所有可用的点的数量
		int total = 0;
		for (int i = 1; i <= n; i++)
			for (int j = 1; j <= m; j++)
				if (mp[i][j] == '.') total++;
		cout << total;
	} else {
		cout << row + col;
	}

	return 0;
}